import jieba
def test():
#去除停用词  
    stopwords = {}.fromkeys(['的', '包括', '等', '是','有限公司','集团','股份','有限责任','公司','有限责任公司'])
    filterwords=['市','省','（','(','）',')']
    text = '''安徽电信器材贸易工业有限责任公司
        '''
    segs = jieba.cut(text, cut_all=False)  
    final = ''  
    for seg in segs:  
        #seg = seg.encode('utf-8')  
        if seg not in stopwords:  
                final += seg  
    print(final)
    #输出:故宫著名景点乾清宫、太和殿和午门。其中乾清宫非常精美，午门紫禁城正门。  
    
    atlast=''
    for a in final:
        if a not in filterwords:
            atlast += a
    print(atlast)


test()